/****************************************
*多线程管理器模型：
*模式：单例模式
*功能：
*	1.支持线程的添加与管理；
****************************************/

#pragma once
#include "Singleton/Singleton.h"
#include "threadA.h"
#include "threadB.h"
#include <map>
#include <Theron/Theron.h>


enum ThreadID {
    THREAD_A,
    THREAD_B
};

class ThreadManager : public Singleton<ThreadManager>
{
public:
    std::map<int, Theron::Address> ID_ADDRESS_MAP;
    int m_num;
    ThreadManager();
    void start();
    void stop();

private:
    int setThreadID(int id, Theron::Address);


public:
    Theron::Framework m_framework;
    CThreadA *m_threadA = nullptr;
    CThreadB *m_threadB = nullptr;
    vector<int> m_timeid;
};